<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>Title</title>
</head>
<body>
第一种：<input type="button" value="选择" name="chose" placeholder="" datad='[{"id":1,"name":"\u6d4b\u8bd51"},{"id":2,"name":"\u6d4b\u8bd51"},{"id":3,"name":"\u6d4b\u8bd51"},{"id":4,"name":"\u6d4b\u8bd51"},{"id":5,"name":"\u6d4b\u8bd51"},{"id":6,"name":"\u6d4b\u8bd51"},{"id":7,"name":"\u6d4b\u8bd51"},{"id":8,"name":"\u6d4b\u8bd51"},{"id":9,"name":"\u6d4b\u8bd51"},{"id":10,"name":"\u6d4b\u8bd51"}]' data='["是","否"]'>
第二种：<input type="button" name="layerChose" placeholder="" value="这是一个底部弹出的询问提示">
<br>
<br>
<button onclick="layerdd()">点我啊</button>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="../js/jquery.actionsheet-1.0.js"></script>
<script src="../js/layer.m.js"></script>
<script type="text/javascript">
    $('input[name="chose"]').on('click',function () {
        var obj = eval('(' + $(this).attr("data") + ')');
        var inst = layer.tips(obj,$(this),function (inst,b,c,d) {
            console.log(inst);
            console.log(b);
            console.log(c);
            console.log(d);
        });
    });
</script>
<script type="text/javascript">
    function layerdd() {
        layer.msg('我被弹出来了~',3,function () {
            layer.alert('别小看我，我可是回调函数弹出来的',undefined,function () {
                layer.msg('也别小看我，我是alert的回调函数弹出来的')
            });
        });
    }
    $('input[name="layerChose"]').on('click',function () {
        layer.open({
            content: '这是一个底部弹出的询问提示'
            ,btn: ['删除', '取消']
            ,skin: 'footer'
            ,yes: function(index){
                layer.alert('那就删掉算了吧~','真残忍！！！！！',function () {
                    layer.msg('都删了你还想怎样');
                });
            }
            ,no:function () {
                layer.msg('不选算了、、、')
            }
        });
    });
</script>
</body>
</html>